﻿using System.Windows.Media;
using System.Windows.Controls;
using System.Windows.Input;

namespace FireFly
{
    /// <summary>
    /// Interface of relay command for view models. See MVVM pattern for details.
    /// </summary>
    public interface IRelayCommand : ICommand
    {
        /// <summary>
        /// Icon of this command which can be used in UI
        /// </summary>
        ImageSource Icon
        {
            get;
        }

        /// <summary>
        /// Caption of this command for UI
        /// </summary>
        string Caption
        {
            get;
        }

        /// <summary>
        /// Create menu item which will wrapp this command
        /// </summary>
        MenuItem CreateMenuItem(ContextMenu menu, object commandParameter);

        /// <summary>
        /// needed for update menuitem state, when context menu is opened
        /// </summary>
        void UpdateCanExecute();
    }
}